class GraphDisplayController < ApplicationController
   def index
      @power_logs = PowerLog.all(:limit => 5, :order => 'created_at DESC')
      util = UtilitySetting.get_utility_settings.last
      if (util.peak_end.hour - util.peak_start.hour) < (Time.now.hour - util.peak_start.hour)
         @util_info = util.peak_price
      else
         @util_info = util.off_peak_price
      end
      v = Time.now.hour
      @green = GreenSimulation.where(["logged_at like '%?%'",Time.now.hour]).last
   end
end
